﻿<ion-view view-title="授信明细" class="creditRepaymentList">
	<ion-nav-bar ng-class="baseclass">
		<ion-nav-back-button></ion-nav-back-button>
	</ion-nav-bar>
	
	<div class="bar bar-subheader padding-0">
		<div class="row top">
			<div class="col" data-authname="销售中商品" rights-ctrl on-tap="activeSlide(0)" ng-class="selectIndex==0?(baseclass=='customer'?'top-activated-red':'top-activated'):''">
				欠款明细
			</div>
			<div class="col" data-authname="待上架商品" rights-ctrl on-tap="activeSlide(1)" ng-class="selectIndex==1?(baseclass=='customer'?'top-activated-red':'top-activated'):''">
				还款明细
			</div>
		</div>
	</div>
	
	<ion-content class="has-header has-subheader bg">
		<ion-slide-box delegate-handle="tab-handle" on-slide-changed="slideChanged(index)" active-slide="tabIndex" show-pager="false" on-touch="onTouch()" on-release="onRelease()">
			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
						<ul class="list">
							<li class="item" ng-repeat="pay in datasArr[0].credit">
								<p class="order">订单号：{{pay.order_id}}</p>
								<p class="time">{{pay.time}}</p>
								<div class="money">{{pay.repayment | currency:''}}</div>
							</li>
						</ul>
					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>
			
			<ion-slide>
				<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
					<!--描述：下拉刷新-->
					<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
						<ul class="list">
							<li class="item" ng-repeat="repay in datasArr[1].credit">
								<p class="order">{{repay.time}}</p>
								<span class="repayType">{{repay.type_name}}</span>
								<!--状态为0时，显示等待对方确认-->
								<span class="waitConfirm" ng-if="repay.status==0">等待对方确认</span>
								<!--状态为2时，显示对方未收到款-->
								<span class="waitConfirm" ng-if="repay.status==2">对方未收到款</span>
								<div class="money" ng-class="{'topLess':repay.type==1}">{{repay.repayment | currency:''}}</div>
								<!--还款方式是1线下支付的时候，显示凭证-->
								<div class="look" ng-if="repay.type==1" on-tap="openModal_voucher($index)">查看凭证</div>
							</li>
						</ul>
					<!--描述：当用户到达页脚或页脚附近时-->
					<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
				</ion-scroll>
			</ion-slide>
		</ion-slide-box>	
	</ion-content>
</ion-view>